/* 评论请求模块 */
import request from '@/utils/request'
/*
获取文章评论列表
 */
export const getCommentlAPI = params => {
  return request({
    method: 'GET',
    // url小写
    url: '/v1_0/comments',
    params: params

  }
  )
}

/*
发表评论
 */
export const CommentlAPI = data => {
  return request({
    method: 'POST',
    // url小写
    url: '/v1_0/comments',
    data

  }
  )
}

/*
评论点赞
 */
export const CommentLikingslAPI = target => {
  return request({
    method: 'POST',
    // url小写
    url: '/v1_0/comment/likings',
    data: {
      target
    }

  }
  )
}
/*
评论点赞
 */
export const CommentDisLikingslAPI = id => {
  return request({
    method: 'DELETE',
    // url小写
    url: `/v1_0/comment/likings/${id}`

  }
  )
}
